Kafka Topic and ACLs
Create a dedicated topic for Data Intake. The examples below assume:
export KAFKA_HOME=/scratch/oipa/kafka
export KAFKA_SECURITY_DIR=$KAFKA_HOME/config/oipa-security
export KAFKA_BOOTSTRAP_SERVER=<kafka-host>:<kafka-port>
export DATA_INTAKE_TOPIC=DataIntakeQueue
export DATA_INTAKE_GROUP=data-intake-verification
Create the topic
cd $KAFKA_HOME
bin/kafka-topics.sh \
--bootstrap-server $KAFKA_BOOTSTRAP_SERVER \
--command-config $KAFKA_SECURITY_DIR/admin.properties \
--create \
--topic $DATA_INTAKE_TOPIC \
--partitions 1 \
--replication-factor 1
Use an environment-appropriate replication factor. A production cluster should normally use a replication factor of at least 3, subject to the number of available brokers.
Consumer ACLs
The OIPA Data Intake principal requires permission to read and describe the topic and read the configured consumer group.
bin/kafka-acls.sh \
--bootstrap-server $KAFKA_BOOTSTRAP_SERVER \
--command-config $KAFKA_SECURITY_DIR/admin.properties \
--add \
--allow-principal User:<oipa-data-intake-principal> \
--operation Read \
--operation Describe \
--topic $DATA_INTAKE_TOPIC
bin/kafka-acls.sh \
--bootstrap-server $KAFKA_BOOTSTRAP_SERVER \
--command-config $KAFKA_SECURITY_DIR/admin.properties \
--add \
--allow-principal User:<oipa-data-intake-principal> \
--operation Read \
--group $DATA_INTAKE_GROUP
Producer ACLs
The application or Data Intake test client publishing messages requires:
bin/kafka-acls.sh \
--bootstrap-server $KAFKA_BOOTSTRAP_SERVER \
--command-config $KAFKA_SECURITY_DIR/admin.properties \
--add \
--allow-principal User:<data-intake-producer-principal> \
--operation Write \
--operation Describe \
--topic $DATA_INTAKE_TOPIC
Verify ACLs
bin/kafka-acls.sh \
--bootstrap-server $KAFKA_BOOTSTRAP_SERVER \
--command-config $KAFKA_SECURITY_DIR/admin.properties \
--list \
--topic $DATA_INTAKE_TOPIC
bin/kafka-acls.sh \
--bootstrap-server $KAFKA_BOOTSTRAP_SERVER \
--command-config $KAFKA_SECURITY_DIR/admin.properties \
--list \
--group $DATA_INTAKE_GROUP